home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / init.d / ifupdown-clean < prev    next >
Encoding:
Text File  |  2009-09-06  |  1.0 KB  |  48 lines

  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:          ifupdown-clean
  4. # Required-Start:    checkroot
  5. # Required-Stop:     
  6. # Default-Start:     S
  7. # Default-Stop:
  8. # Short-Description: Clean old interface status info during boot.
  9. ### END INIT INFO
  10.  
  11. set -e
  12.  
  13. . /lib/lsb/init-functions
  14.  
  15. MYNAME="${0##*/}"
  16. PATH=/sbin:/bin
  17. [ -r /etc/default/ifupdown ] && . /etc/default/ifupdown
  18.  
  19. # Note: The state file location is hardcoded in ifup|ifdown
  20. # it is used as a variable in this script order to ease transitions
  21. # to other locations by the package (not by the sysadmin), if you want
  22. # to setup an alternate location please use a symlink
  23. IFSTATE=/etc/network/run/ifstate
  24.  
  25. case "$1" in
  26.   start)
  27.     log_begin_msg "Cleaning up ifupdown..."
  28.     if [ -f $IFSTATE -a ! -L $IFSTATE ]; then
  29.       rm -f "$IFSTATE"
  30.     elif [ -f $IFSTATE ]; then
  31.       # This is kinda bad :(
  32.       >$IFSTATE
  33.     fi
  34.     log_end_msg 0
  35.     exit 0
  36.     ;;
  37.  
  38.   stop|restart|force-reload)
  39.     exit 0
  40.     ;;
  41.  
  42.   *)
  43.     echo "Usage: $0 {start|stop|restart|force-reload}" >&2
  44.     exit 3
  45.     ;;
  46. esac
  47.  
  48.